package com.base.library.utils;

import java.util.ArrayList;
import java.util.List;

import io.realm.RealmList;

/**
 * Created by ChengZhi on 2017/5/7.
 */

public class RealmUtils {
    public static List realmToList(RealmList realmList) {
        if (!StringUtils.isListEmpty(realmList)) {
            List list = new ArrayList();
            list.addAll(realmList);
            return list;
        } else {
            return null;
        }
    }

    public static RealmList listToRealm(List realmList) {
        if (!StringUtils.isListEmpty(realmList)) {
            RealmList list = new RealmList();
            list.addAll(realmList);
            return list;
        } else {
            return null;
        }
    }
}
